package com.projectexercise.test.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;

@RestController
public class LogDemo {
    private static Logger logger = LoggerFactory.getLogger(LogDemo.class);
    //@PostConstruct
    public void init(){
        System.out.println("sout日志");
        logger.info("log日志");
    }
    //@PostConstruct
    public void init1(){
        logger.error("error日志");
        logger.warn("warn日志");
        logger.info("info日志");
        logger.debug("debug日志");
        logger.trace("trace日志");
    }
}
